from main import *
# 客户端代码
def encrypt_text(text: str, encrypt_types: list):
    cipher = SimpleCipher()
    
    if 'complex' in encrypt_types:
        cipher = ComplexCipher(cipher)
    if 'advanced' in encrypt_types:
        cipher = AdvancedCipher(cipher)
    
    return cipher.encrypt(text)

if __name__ == "__main__":
    # 演示示例
    text = "DecoratorPattern"
    print(f"原始文本: {text}")
    
    print("加密方式:")
    print("1. 仅简单加密:", encrypt_text(text, []))
    print("2. 简单+复杂加密:", encrypt_text(text, ['complex']))
    print("3. 简单+高级加密:", encrypt_text(text, ['advanced']))
    print("4. 简单+复杂+高级加密:", encrypt_text(text, ['complex', 'advanced']))

    